/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.scene.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lczyfz.istep.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * CTF实验环境实例Entity
 * @author dh
 * @version 2017-05-15
 */
public class SceneCtfEnvironmentInstance extends DataEntity<SceneCtfEnvironmentInstance> {

	@Override
	public String toString() {
		return "SceneCtfEnvironmentInstance{" +
				"link='" + link + '\'' +
				'}';
	}

	private static final long serialVersionUID = 1L;
	private String ctfEnvironmentId;		// ctf实验环境id
	private Date endDate;		// 结束时间
	private String ip;		// ip
	private String port;		// 端口
	private String link;		// web链接
	private Date beginEndDate;		// 开始 创建时间
	private Date endEndDate;		// 结束 创建时间
	private String ctfEnvironmentName;		// 实验环境名称
	private String ctfEnvironmentTime; // ctf实验时间
	private String ctfEnvironmentType;// ctf实验类型
	private String ctfType;		// ctf类型
	private String autoDelete;//是否是生成实例
	private String vmTemplateName;// 虚拟机名称
	private String vmTemplateId;// 虚拟机模板id
	private String vmName;// 虚拟机模板名称
	private String vmId;
	private String createUserName;//实例创建者

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	public String getVmId() {
		return vmId;
	}

	public void setVmId(String vmId) {
		this.vmId = vmId;
	}
	public Date getBeginEndDate() {
		return beginEndDate;
	}

	public void setBeginEndDate(Date beginEndDate) {
		this.beginEndDate = beginEndDate;
	}

	public Date getEndEndDate() {
		return endEndDate;
	}

	public void setEndEndDate(Date endEndDate) {
		this.endEndDate = endEndDate;
	}

	public String getVmTemplateName() {
		return vmTemplateName;
	}

	public void setVmTemplateName(String vmTemplateName) {
		this.vmTemplateName = vmTemplateName;
	}

	public String getVmTemplateId() {
		return vmTemplateId;
	}

	public void setVmTemplateId(String vmTemplateId) {
		this.vmTemplateId = vmTemplateId;
	}

	public String getVmName() {
		return vmName;
	}

	public void setVmName(String vmName) {
		this.vmName = vmName;
	}

	public String getAutoDelete() {
		return autoDelete;
	}

	public void setAutoDelete(String autoDelete) {
		this.autoDelete = autoDelete;
	}

	public String getCtfEnvironmentName() {
		return ctfEnvironmentName;
	}

	public void setCtfEnvironmentName(String ctfEnvironmentName) {
		this.ctfEnvironmentName = ctfEnvironmentName;
	}

	public String getCtfEnvironmentType() {
		return ctfEnvironmentType;
	}

	public void setCtfEnvironmentType(String ctfEnvironmentType) {
		this.ctfEnvironmentType = ctfEnvironmentType;
	}

	public String getCtfType() {
		return ctfType;
	}

	public void setCtfType(String ctfType) {
		this.ctfType = ctfType;
	}

	public String getCtfEnvironmentTime() {
		return ctfEnvironmentTime;
	}

	public void setCtfEnvironmentTime(String ctfEnvironmentTime) {
		this.ctfEnvironmentTime = ctfEnvironmentTime;
	}

	public SceneCtfEnvironmentInstance() {
		super();
	}

	public SceneCtfEnvironmentInstance(String id){
		super(id);
	}

	@Length(min=0, max=64, message="教学实验环境id长度必须介于 0 和 64 之间")
	public String getCtfEnvironmentId() {
		return ctfEnvironmentId;
	}

	public void setCtfEnvironmentId(String ctfEnvironmentId) {
		this.ctfEnvironmentId = ctfEnvironmentId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=64, message="ip长度必须介于 0 和 64 之间")
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
	
	@Length(min=0, max=64, message="端口长度必须介于 0 和 64 之间")
	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}
	
	@Length(min=0, max=128, message="web链接长度必须介于 0 和 128 之间")
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}
	
}